<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<script>
function doDel(id){
	if(confirm("确定要删除吗!")){
	var form = document.myform;
	form.action='/stu/'+id;
	form.submit();
	}

}
</script>
<body class="docs language-php">
<center>
<form action="/stu/" method="post" name="myform" style="display:none">
	<input type="hidden" name="_token" value="{{ csrf_token() }}">
	<input type="hidden" name="_method" value="delete">
	<input type="hidden" name="id" >

</form>
<h3>学生浏览信息</h3>
   @include('stu.menu')
            <table width="700" border="1">
                <tr>
                    <th>学号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th>班级</th>
                    <th>操作</th>
                </tr>
@foreach ($list as $stu)
    <tr>
		<td>{{ $stu->id }}</td>
		<td>{{ $stu->name }}</td>
		<td>{{ $stu->sex }}</td>
		<td>{{ $stu->age }}</td>
		<td>{{ $stu->classid }}</td>
		<td><a href="javascript:doDel({{ $stu->id }})">删除</a><a href="/stu/{{ $stu->id }}/edit">编辑</a></td>
	</tr>
@endforeach
            </table>
			</center>
			</body>
			</html>
